package com.kr.redeye.function;

import java.util.HashMap;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.kr.redeye.common.dao.CommonDAO;
import com.kr.redeye.dto.FunctionTableDto;

@Repository("FunctionDao")
public class FunctionDao  extends CommonDAO {
	
	public int insert(FunctionTableDto param) {
		return getSqlMapClientTemplate().update("nsFunction.insert", param);
	}
	
	public int upd(FunctionTableDto param) {
		return getSqlMapClientTemplate().update("nsFunction.upd", param);
	}
	
	public int del(FunctionTableDto param) {
		return getSqlMapClientTemplate().update("nsFunction.del", param);
	}
	
	@SuppressWarnings("unchecked")
	public List<HashMap<String, String>> getList(FunctionTableDto param) {
		return (List<HashMap<String, String>>)getSqlMapClientTemplate().queryForList("nsFunction.getList", param);
	}
}
